
/*
 * Retrigger next event is called after clock was set with interrupts
 * disabled through an SMP function call or directly from low level
 * resume code.
 *
 * This is only invoked when:
 *	- CONFIG_HIGH_RES_TIMERS is enabled.
 *	- CONFIG_NOHZ_COMMON is enabled
 *
 * For the other cases this function is empty and because the call sites
 * are optimized out it vanishes as well, i.e. no need for lots of
 * #ifdeffery.
 */
static void retrigger_next_event(void *arg)
{
    struct hrtimer_cpu_base *base = this_cpu_ptr(&hrtimer_bases);

    /*
     * When high resolution mode or nohz is active, then the offsets of
     * CLOCK_REALTIME/TAI/BOOTTIME have to be updated. Otherwise the
     * next tick will take care of that.
     *
     * If high resolution mode is active then the next expiring timer
     * must be reevaluated and the clock event device reprogrammed if
     * necessary.
     *
     * In the NOHZ case the update of the offset and the reevaluation
     * of the next expiring timer is enough. The return from the SMP
     * function call will take care of the reprogramming in case the
     * CPU was in a NOHZ idle sleep.
     */
 //   if (!hrtimer_hres_active(base) && !tick_nohz_active)
  //      return;

    raw_spin_lock(&base->lock);
    hrtimer_update_base(base);
    if (hrtimer_hres_active(base))
        hrtimer_force_reprogram(base, 0);
    else
        hrtimer_update_next_event(base);
    raw_spin_unlock(&base->lock);
}
